package sg.edu.nus.iss.vmcs.store;

/*
 * Copyright 2003 ISS.
 * The contents contained in this document may not be reproduced in any
 * form or by any means, without the written permission of ISS, other
 * than for the purpose for which it has been supplied.
 *
 */

/**
 * This class will represent a Coin that has a value and weight
 *
 * @version 3.0 5/07/2003
 * @author Olivo Miotto, Pang Ping Li
 */

public class Coin extends StoreObject {

	private int value;
	private double weight;

	/**
	 * Default constructor that creates a coin
	 */
	public Coin() {
	}

	/**
	 * Constructor that creates a coin with value and weight
	 * 
	 * @param value
	 *            the value in cents which the coin represents
	 * @param weight
	 *            the weight of the coin in double
	 */
	public Coin(int value, double weight) {
		this.value = value;
		this.weight = weight;
	}

	/**
	 * Setter method for Value
	 * 
	 * @param v
	 *            the new value in cents which the coin will represents
	 */
	public void setValue(int v) {
		value = v;
	}

	/**
	 * Setter method for weight
	 * 
	 * @param wt
	 *            the new weight of the coin
	 */
	public void setWeight(double wt) {
		weight = wt;
	}

	/**
	 * Get the weight of the coin
	 * 
	 * @return the weight of the coin in double
	 */
	public double getWeight() {
		return (weight);
	}

	/**
	 * Get the value of the coin
	 * 
	 * @return the value of the coin in int
	 */
	public int getValue() {
		return (value);
	}

}
